package com.du.integration.server.handle;

import org.eclipse.paho.mqttv5.common.MqttMessage;

/**
 * @Desc :
 * @Author: shuangdu
 * @date : 2024/1/9
 */
public interface MqttMsgHandle {

    /**
     * 是否匹配
     * @param topic
     * @return
     */
    boolean filter(String topic);

    /**
     * 处理消息
     * @param topic
     * @param mqttMessage
     */
    void handle(String topic, MqttMessage mqttMessage);

    void register(String topic);

}
